﻿using project.B12.Model.BaseModel;
using project.B12.Model.Enums;
using software.Common.MVVM;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace project.B12.Model.Models
{
    /// <summary>
    /// 菌数据库
    /// </summary>
    [SugarTable("TB_SIR")]
    [TenantAttribute("0")]//对应ConfigId
    public class Table_SIR : AggregateRootEntity
    {
        public Table_SIR() 
        {
        }

        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 菌中文名称
        /// </summary>
        private string _cN_Name;
        [SugarColumn(IsIgnore = true)]
        public string CN_Name
        {
            get { return _cN_Name; }
            set { _cN_Name = value; this.RaisePropertyChanged(); }
        }

        /// <summary>
        /// 菌名称
        /// </summary>
        private string _name;
        [SugarColumn(IsIgnore = true)]
        public string Name
        {
            get { return _name; }
            set { _name = value; this.RaisePropertyChanged(); }
        }

        /// <summary>
        /// 菌的层级
        /// </summary>
        private BacteriaLevel _bacteriaLevel;
        [SugarColumn(IsNullable = false)]
        public BacteriaLevel BacteriaLevel
        {
            get { return _bacteriaLevel; } 
            set { _bacteriaLevel = value; this.RaisePropertyChanged(); }
        }

        /// <summary>
        /// 菌的主键ID
        /// </summary>
        private int _bacteriaLevelID;
        [SugarColumn(IsNullable = false)]
        public int BacteriaLevelID
        {
            get { return _bacteriaLevelID; }
            set { _bacteriaLevelID = value; this.RaisePropertyChanged(); }
        }

        /// <summary>
        /// 药的主键ID
        /// </summary>
        private int _medicineID;
        [SugarColumn(IsNullable = false)]
        public int MedicineID
        {
            get { return _medicineID; }
            set { _medicineID = value; this.RaisePropertyChanged(); }
        }

        /// <summary>
        /// 药
        /// </summary>
        private string _target;
        [SugarColumn(IsIgnore = true)]
        public string Target
        {
            get { return _target; }
            set { _target = value; this.RaisePropertyChanged(); }
        }

        /// <summary>
        /// 药物名
        /// </summary>
        private string _medicineName;
        [SugarColumn(IsIgnore = true)]
        public string MedicineName
        {
            get { return _medicineName; }
            set { _medicineName = value; this.RaisePropertyChanged(); }
        }

        /// <summary>
        /// 
        /// </summary>
        private string _s;
        [SugarColumn(IsNullable = false)]
        public string S
        {
            get { return _s; }
            set
            {
                _s = value;
                this.RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 
        /// </summary>
        private string _i;
        [SugarColumn(IsNullable = true)]
        public string I
        {
            get { return _i; }
            set
            {
                _i = value;
                this.RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 
        /// </summary>
        private string _r;
        [SugarColumn(IsNullable = false)]
        public string R
        {
            get { return _r; }
            set
            {
                _r = value;
                this.RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 来源
        /// </summary>
        private string _source;
        [SugarColumn(IsNullable = true)]
        public string Source
        {
            get { return _source; }
            set
            {
                _source = value;
                this.RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 备注
        /// </summary>
        private string _remarks;
        [SugarColumn(IsNullable = true)]
        public string Remarks
        {
            get { return _remarks; }
            set
            {
                _remarks = value;
                this.RaisePropertyChanged();
            }
        }

        /// <summary>
        /// 是否已修改
        /// </summary>
        private bool isUpdate;
        [SugarColumn(IsIgnore = true)]
        public bool IsUpdate
        {
            get { return isUpdate; }
            set
            {
                isUpdate = value;
                this.RaisePropertyChanged();
            }
        }

        /// <summary>
        /// false 表示需要添加
        /// </summary>
        private bool isAdd;
        [SugarColumn(IsIgnore = true)]
        public bool IsAdd
        {
            get { return isAdd; }
            set
            {
                isAdd = value;
                this.RaisePropertyChanged();
            }
        }
    }
}
